#-*-coding:UTF-8-*-

class Parent:

    def __init__(self,name):
        self.name='Parent:init'
        print(self.name+":"+name)

    def first(self):
        self.name="Parent:first"
        print(self.name)


parent=Parent("Tom")
parent.first()

class Child(Parent):
    def second(self):
        self.name = "Child:second"
        print(self.name)


child=Child("Jack")
child.first()
child.second()

class Grandson(Child):
    def third(self):
        self.name = "Grandson:third"
        print(self.name)

    @staticmethod
    def four():
        print("static:four")

son=Grandson("Mott")
son.first()
son.second()
son.third()
Grandson.four()

